//
//  SigleButtonViewController.swift
//  CHSimpleUI
//
//  Created by cyptt on 2023/4/28.
//

import UIKit

class SigleButtonViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        
        self.view.addSubview(self.singleChioseOCView)
        self.view.addSubview(self.singleChioseSwiftView)
        
        self.singleChioseOCView.snp.makeConstraints { make in
            make.left.equalTo(0)
            make.top.equalTo(200)
            make.width.equalToSuperview()
            make.height.equalTo(40)
        }
        
        self.singleChioseSwiftView.snp.makeConstraints { make in
            make.left.equalTo(0)
            make.top.equalTo(self.singleChioseOCView.snp.bottom).offset(40)
            make.width.equalToSuperview()
            make.height.equalTo(40)
        }
        
        self.singleChioseOCView.setTitleArr(["001","002"], defaultColor: UIColor.red, selectedColor: UIColor.blue, lineColor: UIColor.blue)
        
        //MARK: -- 002
        self.singleChioseSwiftView.setTitleArr(titleArr: ["001","第二个按钮"],local: .right,defaultColor: UIColor.red,selectedColor: UIColor.blue,defFont:UIFont.systemFont(ofSize: 15),selFont:UIFont.systemFont(ofSize: 20),lineColor:UIColor.blue,lineH: 3,itemW: 120)
        
     
        self.singleChioseSwiftView.btnClickIndexBlockFun { index, title in

            print("index",index)
            self.singleChioseSwiftView.freshItem(index: index, title: "点击了这里" + String(index))
        }
        
    }
    
  
   
    
    lazy var singleChioseOCView:CHSingleChioseView = {
        let singleView:CHSingleChioseView = CHSingleChioseView()
    
        return singleView
    }()
    
    
    lazy var singleChioseSwiftView:CHSingleChioseViewSwift = {
        let singleView:CHSingleChioseViewSwift = CHSingleChioseViewSwift()
    
        return singleView
    }()
    
}


extension SigleButtonViewController{
    
}






